const mongoose = require('mongoose')
const baseModel = require('./base-model')
const Schema = mongoose.Schema;
// 为集合（表）创建模式（schema)
const userBackUpSchema = Schema({
    ...baseModel,
    appList:{
        type:Schema.Types.Mixed, 
        default:[]
    },
    note:{
        type:Schema.Types.Mixed,
        default:[]
    },
    todo:{
        type:Schema.Types.Mixed,
        default:[]
    },
    creater: {
        type:Schema.Types.ObjectId,
        ref:'User'
    }
});
userBackUpSchema.set('toJSON', { getters: true });
module.exports = userBackUpSchema